package config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

/**
 * TODO
 *
 * @author 发哥讲Java
 * @version 1.0
 * @date 2021-04-08 16:31
 */
//D:\development\workspace\fagejiang\frames\springboot-test\config
@PropertySource(value = "file:${user.dir}/config/setting.properties", encoding = "UTF-8")
@Data
@ConfigurationProperties(prefix = "custom")
@Component
public class Config {
    private String name;

    public static void main(String[] args) {
        //D:\development\workspace\fagejiang\frames\springboot-test\config
        System.out.println(System.getProperty("user.dir"));
    }
}
